package com.jingwei.controllers;

import java.util.List;

import net.paoding.rose.web.annotation.Param;
import net.paoding.rose.web.annotation.rest.Get;
import net.paoding.rose.web.var.Model;

import org.springframework.beans.factory.annotation.Autowired;

import com.jingwei.bean.User;
import com.jingwei.service.UserService;

public class UserController {

	@Autowired
	private UserService userService;

	@Get("")
	public String index(Model model, @Param("limit")
	int limit) {
		List<User> userList = userService.list(limit);
		model.add("userList", userList);
		return "user";
	}

}
